package com.zelin.controller;

import com.zelin.pojo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ------------------------------
 * 功能：
 * 作者：WF
 * 微信：hbxfwf13590332912
 * 创建时间：2021/9/17-15:05
 * ------------------------------
 */
@RestController
@RequestMapping("user")
public class UserController {

    //1. 用户登录
    @PostMapping("login")
    public R login(){
        return R.ok().data("token",1);
    }

    //2. 获取用户信息
    @GetMapping("info")
    public R info(){
        return R.ok().data("name","admin").data("avatar","https://himg.bdimg.com/sys/portrait/item/public.1.430273bd.vwTUTKa1lEZ-lJHihxbSRw.jpg");
    }
}
